package com.xln.furn.been;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Furn {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @NotEmpty(message = "家居名不能为空！")
    private String name;
    @NotEmpty(message = "制造商不能为空！")
    private String maker;
    @NotNull(message = "价格不能为空！")
    @Range(min = 0,message = "价格不能小于0！")
    private Double price;
    @NotNull(message = "销量不能为空！")
    @Range(min = 0,message = "销量不能小于0！")
    private Integer sales;
    @NotNull(message = "库存不能为空！")
    @Range(min = 0,message = "库存不能小于0！")
    private Integer stock;



}
